//
//  GXQRPreview.m
//  ScanQRCode
//
//  Created by Ssky on 2016/11/21.
//  Copyright © 2016年 Sky SS. All rights reserved.
//

#import "GXQRPreview.h"

@implementation GXQRPreview

+ (Class)layerClass {
    return [AVCaptureVideoPreviewLayer class];
}

+ (instancetype)previewWithSession:(AVCaptureSession *)session {
    GXQRPreview * preview = [[self alloc] init];
    preview.session = session;
    return preview;
}

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupUIConfig];
    }
    return self;
}

#pragma mark - Actions



#pragma mark - methods



#pragma mark - setupUIConfig
-(void) setupUIConfig {
    //
    
}


#pragma mark - lazy

- (void)setSession:(AVCaptureSession *)session {
    _session = session;
    
    AVCaptureVideoPreviewLayer * pvwLayer = (AVCaptureVideoPreviewLayer *)self.layer;
    pvwLayer.session = session;
}



@end
